#include "controlDevice.h"
#include <stdlib.h>

fireInit(int pinNum)
{
  pinMode(pinNum, INPUT);
  digitalWrite(pinNum, HIGH);
};
readStaus(int staus)
{
  return digitalRead(staus);
};
struct Devices fire = {
    .devicesName = "fire",
    .pinNum = 8,
    .deviceInit = fireInit,
    .readStaus = readStaus

};
struct Devices *addfireToDeviceLink(struct Devices *pthead)
{
  if (pthead == NULL)
  {
    return &fire;
  }
  else
  {

    fire.next = pthead;
    pthead = &fire;
    return pthead;
  }
}
